<html>
<head><meta charset="utf-8"><title>stdarch as submodule · t-libs · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/index.html">t-libs</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/stdarch.20as.20submodule.html">stdarch as submodule</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="245575792"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/stdarch%20as%20submodule/near/245575792" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bstrie <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/stdarch.20as.20submodule.html#245575792">(Jul 10 2021 at 22:48)</a>:</h4>
<p>What was the original reason that stdarch is a submodule rather than in-tree? I can't really figure out why it doesn't live in libcore directly, and even the readme seems to suggest that the repo shouldn't be used</p>



<a name="245576205"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/stdarch%20as%20submodule/near/245576205" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> BurntSushi <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/stdarch.20as.20submodule.html#245576205">(Jul 10 2021 at 23:00)</a>:</h4>
<p>it started as <a href="http://github.com/BurntSushi/stdsimd">github.com/BurntSushi/stdsimd</a>: <a href="https://github.com/rust-lang/stdarch/commit/e00fa2a29d1724c3ad6049d513dcae491038ed7b">https://github.com/rust-lang/stdarch/commit/e00fa2a29d1724c3ad6049d513dcae491038ed7b</a></p>
<p>at some point, we (alex and i, i think) started crowd-sourcing the implementations of the Intel intrinsics, and just generally found it easier to iterate outside of rust proper. i think it was more a matter of not having a great reason to move it in tree.</p>
<p>with that said, <span class="user-mention" data-user-id="116015">@Alex Crichton</span> might have some deeper insight here.</p>



<a name="245576440"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/stdarch%20as%20submodule/near/245576440" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bstrie <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/stdarch.20as.20submodule.html#245576440">(Jul 10 2021 at 23:04)</a>:</h4>
<p>right now I'm just wondering if I need to do any sort of coordination dance if I'm making changes to both the rust repo and stdarch simultaneously, or if it's ok to leave the HEAD of the stdarch repo in a partly-finished state that wouldn't compile with rust HEAD until the rust PR is accepted</p>



<a name="245576589"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/stdarch%20as%20submodule/near/245576589" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bstrie <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/stdarch.20as.20submodule.html#245576589">(Jul 10 2021 at 23:08)</a>:</h4>
<p>which is to say, I'm moving <code>asm!</code> into stdarch, and obviously I can't have it be defined twice, and the easy way just involves defining it in stdarch, and then not bumping the stdarch dep until I can atomically remove the current <code>asm!</code> definition</p>



<a name="245576651"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/stdarch%20as%20submodule/near/245576651" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bstrie <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/stdarch.20as.20submodule.html#245576651">(Jul 10 2021 at 23:10)</a>:</h4>
<p>although I guess, heh, there's no reason that two macros can't be defined by the same compiler builtin... and there's no reason that the compiler has to know that the two exported items are the same thing... so actually I can just define it in stdarch, and bump the dep whenever, and then I only need to remove the rust repo implementation when I go through and add it to the prelude</p>



<a name="245686535"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/stdarch%20as%20submodule/near/245686535" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alex Crichton <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/stdarch.20as.20submodule.html#245686535">(Jul 12 2021 at 13:35)</a>:</h4>
<p>This was originally done for maintainability and testability, it was just easier to iterate outside and include as a submodule later.</p>



<a name="245686587"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/stdarch%20as%20submodule/near/245686587" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alex Crichton <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/stdarch.20as.20submodule.html#245686587">(Jul 12 2021 at 13:35)</a>:</h4>
<p>There's precedent, however, for having changes on the main branch of stdarch which can't land in rust-lang/rust. It blocks updating the submodule but it's not unheard of</p>



<a name="245708737"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/stdarch%20as%20submodule/near/245708737" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/stdarch.20as.20submodule.html#245708737">(Jul 12 2021 at 16:10)</a>:</h4>
<p>Would those be substantially harder to do with a fork of rust-lang/rust, if stdarch weren't a submodule?</p>



<a name="245854090"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/stdarch%20as%20submodule/near/245854090" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Thom Chiovoloni <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/stdarch.20as.20submodule.html#245854090">(Jul 13 2021 at 16:55)</a>:</h4>
<p>Moving stdarch into rust-lang/rust would probably make it easier on tooling. As it is, nothing in core::arch has any support in rust-analyzer, it's been this way for a while, and when I tried to solve it, it seemed fairly difficult. (Obviously tooling limitations aren't that compelling of a reason to drive organization, but as it is, it is at the very least, fairly odd the way that libcore includes stdarch via a fairly circuitious <code>#[path]</code> expression...)</p>



<a name="245854275"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/stdarch%20as%20submodule/near/245854275" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Thom Chiovoloni <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/stdarch.20as.20submodule.html#245854275">(Jul 13 2021 at 16:56)</a>:</h4>
<p>I'm not really looking forward for a change like this for several reasons (I guess the ship has sailed on it if it's this close to happening), but honestly the biggest one is the prospect of losing IDE support for the <code>asm!</code> macro.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>